The present invention generally relates to systems which scan documents and convert the scanned documents into electronic image data which can be utilized by a printing system to render the electronic image on a subsequent recording medium. More particularly, the present invention is directed to a system and method for detecting and masking scanning artifacts which are produced during the conversion of the image on a scanned document into electronic image data.
In the reproduction of an original document from video image data created, for example, by electronic scanning of the original document, it is often desirable to provide functions dependent upon determining the exterior edges of the document. Such features include, for example, automatic magnification, automatic two-up copying, deletion of background image data which falls outside the detected exterior edges of the document, automatic location of the document in a scanning system, electronic deskewing of the electronic image, etc. In other words, to provide these features, the exterior edges of the document must somehow be detected by the scanning system.
Conventionally, to achieve the detection of the exterior edges of the original document, a backing that has a tendency to be distinguishable from the original document has been provided. For example, such backings have been provided with a yellow color, a black color or a whiter than white color, a backing which fluoresces, and various other alternatives. Although various alternatives have been utilized, when scanning documents utilizing a digital scanning system, it is desirable to utilize a light absorbing (e.g., black or dark) backing so as to eliminate show through when scanning a double-sided or watermarked document. By utilizing a light absorbing backing such as a black color, the scanning system can both eliminate show through when scanning the document and enable the scanning system or other downstream image processing system to automatically locate the exterior edges of the original document, thereby enabling auto-registration and electronic deskewing processes to be performed.
However, an undesirable consequence of using a light absorbing backing is that any defect in the original document; such as holes, cuts, rips, dog-ears, etc. or other characteristic properties of the original; such as pre-punched holes, etc.; appear as black objects when they are rendered and printed on a recording medium. This is due to the fact that the captured image has the backing area""s gray value (black) wherever the defect (e.g., pre-punched holes, cuts, rips, dog-ear, etc.) is present in the original document. These areas, where the backing area""s gray value is present within the original image, are considered scanning artifacts.
In most cases, it is undesirable to render the scanning artifact in a copy, especially when the background of the copy is white and the artifact is rendered as black. For example, FIG. 1 illustrates an original document 2 comprising image 4 printed on three-hole pre-punched paper such that the three holes are represented by defects 6. If this document is scanned by a conventional system, wherein the backing behind the document, such as a platen cover or an automatic feed roller or ski is non-reflective, the recorded image 12, as shown in FIG. 2, would include dark or black regions 16 (scanning artifacts) which correspond to defects 6 in the original document. Similarly, if the document of FIG. 1 is scanned by a system wherein the backing is white, but is dirty from use, has scratches or otherwise is not of a reflectance equivalent to the document background, the original image as reproduced on a recording or display medium 12 (FIG. 3) may contain scanning artifacts in the form of regions 16 corresponding to defects 6 of the original.
Therefore, it is desirable to be able to scan in an original document having certain defects, such as pre-punched holes, cuts, rips, etc., and to render the image on a recording or display medium void of any evidence of the scanning artifact. In other words, the scanning artifacts should be masked to eliminate or reduce the appearance of the artifacts in the rendered image, notwithstanding the fact that the original document included the defects.
A first aspect of the present invention is a process for masking a scanning artifact within image data representing a document. The process includes generating pixel classification tags for the image data; identifying a window within the image data associated with a scanning artifact using the pixel classification tags; analyzing the image data to derive a replacement video value; and replacing image data associated with a scanning artifact with the replacement video value.
Another aspect of the present invention is a device for masking a scanning artifact within video image data representing a document. The device includes a classification circuit to generate pixel classification tags for the video image data. An autowindowing circuit, connected to receive the pixel classification tags, generates window data identifying scanning artifacts. A statistics compilation circuit, connected to receive the video image data and the window data, generates video replacement data. A video replacement circuit, connected to receive the video replacement data, replaces selected pixels within second pass image data with the video replacement data.
In accordance with another aspect of the present invention there is provided a system for processing image data representing a scanned image. The system includes an image input terminal providing the image data and a masking processor for detecting and masking a scanning artifact within the image data. The masking processor includes a classification circuit for identifying backing pixels within the video image data, an autowindowing circuit for generating window data identifying scanning artifacts, an image analysis circuit for generating video replacement data, and a video replacement circuit for replacing selected pixels within second pass image data with the video replacement data. The system further includes an image output terminal for generating an image in response to the second pass image data received from the video replacement circuit.